Component({

  behaviors: [],

  properties: {
    myProperty: { // 属性名
      type: Array, // 类型（必填），目前接受的类型包括：String, Number, Boolean, Object, Array, null（表示任意类型）
      value: [
        //选填项，不设默认选中,需要用户手动选择；
        //如果选择了一个，设计时间为4h，每增加一个，增加2h设计时间。

        {
          title: "上颌",
          desc: "可多选，如有疑问请联系客服协助。",
          type: "maxillary",
          preTime: 2,
          selectors: [
            { text: "Lefort Ⅰ", checked: false, time: 2 },
            { text: "Lefort Ⅱ", checked: false, time: 2 },
            { text: "Lefort Ⅲ", checked: false, time: 2 },
            { text: "上颌前部切开术", checked: false, time: 2 },
            { text: "上颌后部切开术", checked: false, time: 2 },
            { text: "牵引成骨", checked: false, time: 2 },
            { text: "颧骨修整", checked: false, time: 2 },
          ],
          selectedTime: 0,
        }, {
          title: "下颌",
          desc: "可多选，如有疑问请联系客服协助。",
          type: "mandible",
          preTime: 0,
          selectors: [
            {
              preTime: 2,
              selectors: [
                { text: "下颌下缘修整", checked: false, time: 2 },
                { text: "根尖截骨", checked: false, time: 2 },
                { text: "颏成型", checked: false, time: 2 }
              ]
            },
            {
              preTime: 2,
              label: "矢状劈开：",
              selectors: [
                { text: "左侧", checked: false, time: 2 },
                { text: "右侧", checked: false, time: 2 }
              ],
            }, {
              preTime: 2,
              label: "垂直截骨：",
              selectors: [
                { text: "左侧", checked: false, time: 2 },
                { text: "右侧", checked: false, time: 2 }
              ],
            }, {
              preTime: 0,
              label: "牵引成骨：",
              selectors: [
                { text: "左侧", checked: false, time: 4 },
                { text: "右侧", checked: false, time: 4 }
              ]
            }, {
              preTime: 2,
              label: "下颌角成型术：",
              selectors: [
                { text: "左侧", checked: false, time: 2 },
                { text: "右侧", checked: false, time: 2 }
              ]
            }
          ],
          selectedTime: 0,
        }, {
          title: "咬合板类型",
          type: "biteplate",
          selectors: [
            {
              text: "术中咬合板：", selectors: [
                { text: "以下颌固位调整上颌", checked: false, value: 0, needNumberCounter: true },
                { text: "以上颌固位调整下颌", checked: false, value: 0, needNumberCounter: true }
              ]
            }, {
              text: "终末咬合板：", selectors: [
                { text: "以下颌固位调整上颌", checked: false, desc: "需要请勾选", value: 0, needNumberCounter: false },
              ]
            }
          ]
        }, {
          title: "模型类型",
          desc: "我们会提供一个模型，请选择需要的模型类型。",
          type: "modeltype",
          selectors: [
            { text: "术前模型", checked: false },
            { text: "术后模型", checked: false }
          ]
        }
      ], // 属性初始值（可选），如果未指定则会根据类型选择一个
      observer: function (newVal, oldVal) { } // 属性被改变时执行的函数（可选），也可以写成在methods段中定义的方法名字符串, 如：             '_propertyChange'
    },
    myProperty2: String // 简化的定义方式
  },
  data: {}, // 私有数据，可用于模版渲染

  // 生命周期函数，可以为函数，或一个在methods段中定义的方法名
  created:function(){
    
  },
  attached: function () { },
  moved: function () { },
  detached: function () { },

  methods: {
    onMyButtonTap: function () {
      this.setData({
        // 更新属性和数据的方法与更新页面数据的方法类似
      })
    },
    _myPrivateMethod: function () {
      // 内部方法建议以下划线开头
      this.replaceDataOnPath(['A', 0, 'B'], 'myPrivateData') // 这里将 data.A[0].B 设为 'myPrivateData'
      this.applyDataUpdates()
    },
    _propertyChange: function (newVal, oldVal) {

    }
  }

})